<div class='top'>
<h1>Lista de <%= Inflector.pluralize(@model).to_s %></h1>
<%= display_menu %>
</div>
<div class='body'>
<table class="ordenada">
  <tr>
  <% if @model.instance_of? Profesor %>
    <th>Departamento</th>
    <th>Área</th>
    <th>Nombre</th>
    <th>Correo</th>
    <th>Cubículo</th>
  <% else %>
    <th>Cuenta</th>
    <th>Semestre</th>
    <th>Nombre</th>
    <th>Correo</th>
    <th>Carrera</th>
  <% end %>
  </tr>

<% for record in @collection %>
	<% unless record.nombre.eql? 'admin' %>
		<% if @model ==  Profesor %>
			<tr class="pequeno"> 
		    <td class="separado"><%=h record.departamento %></td>
		    <td class="separado"><%=h record.area %></td>
		    <td class="separado"><%=h record.nombre_completo %></td>
		    <td class="separado"><%=h record.correo %></td>
		    <td class="separado"><%=h record.cubiculo %></td>
		    <td class="separado">
			    <%= link_to 'Detalle', :action => 'show', :id => record %>
			    <%= link_to 'Eliminar', { :action => 'destroy', :id => record }, :confirm => 'Are you sure?', :method => :post %>
		    </td>
		  </tr>
		<% else %>
		  <tr class="pequeno"> 
		    <td class="separado"><%=h record.cuenta %></td>
		    <td class="separado"><%=h record.semestre %></td>
		    <td class="separado"><%=h record.nombre_completo %></td>
		    <td class="separado"><%=h record.correo %></td>
		    <td class="separado"><%=h record.carrera %></td>
		    <td class="separado">
			    <%= link_to 'Detalle', :action => 'show', :id => record %>
			    <%= link_to 'Eliminar', { :action => 'destroy', :id => record }, :confirm => 'Are you sure?', :method => :post %>
		    </td>
		  </tr>
		<% end %>
  <% end %>
<% end %>
</table>

<%= link_to 'Previous page', { :page => @pages.current.previous } if @pages.current.previous %>
<%= link_to 'Next page', { :page => @pages.current.next } if @pages.current.next %>



<%= link_to image_tag("add", :size => "40x40", :border => 0), :action => 'new' %>
</div>

